refactor(perps): use MMDS HeaderStandard#29703
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ed03b88. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Directly affected components:
Tag selection rationale:
Not selected:
Performance Test Selection: |
|




Description
This PR replaces the temporary
HeaderCompactStandardcomponent withHeaderStandardfrom@metamask/design-system-react-nativeacross Perps surfaces.Reason: Standardize Perps headers on the MetaMask design system and reduce dependence on
component-library/components-tempfor common header patterns.What changed:
HeaderStandardis now used for the Perps markets list, withdrawal flow, transaction detail screens (funding, order, position—including the “not found” states), and the default header insidePerpsBottomSheetTooltipwhen no custom header is supplied. Existing props such asincludesTopInset,onBack,onClose,title,backButtonProps, andtestIDare preserved so behavior should match the previous implementation.Tests:
PerpsMarketListHeader.test.tsxwas updated to spreadjest.requireActual('@metamask/design-system-react-native')into the design-system mock and to remove the dedicatedHeaderCompactStandardmock, so tests exercise the realHeaderStandardbehavior from the design system package.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-700
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Low risk refactor that swaps a temporary header component for the design-system
HeaderStandard; main risk is minor UI/layout or testID regressions across Perps screens.Overview
Standardizes Perps UI headers by replacing the temporary
HeaderCompactStandardwith MMDSHeaderStandardacross the markets list, withdraw flow, transaction detail screens (including “not found” states), the default header inPerpsBottomSheetTooltip, and the sharedListHeaderWithSearch.Updates the
PerpsMarketListHeadertest setup to rely on the real design-system exports (spreadingjest.requireActual('@metamask/design-system-react-native')) and removes the dedicatedHeaderCompactStandardmock so tests exerciseHeaderStandardbehavior.Reviewed by Cursor Bugbot for commit 5e55753. Bugbot is set up for automated code reviews on this repo. Configure here.